<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>茶叶销售管理系统</title>
<link rel="stylesheet" href="../css/main.css">
<link rel="stylesheet" href="../css/footer.css">
<link rel="stylesheet"
	href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script
	src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script
	src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script language="javascript" type="text/javascript">
	function check() {
		var e = document.form.email.value;
		var p = document.form.phone.value;
		if (!/(\S)+[@]{1}(\S)+[.]{1}(\w)+/.test(e)) {
			alert("请输入格式正确的 e-mail 地址！");
			return false;
		} else if ((!(/^1[34578]\d{9}$/.test(phone)))) {
			alert("请输入正确的电话格式!");
			return false;
		} else {
			return true;
		}
	}
</script>
</head>
<body>
	<jsp:include page="navbar.jsp" />

	<div class="col-md-2" style="padding-left: 20px; padding-top: 20px">
		<div class="raw">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">操作</h3>
				</div>
				<div class="panel-body">
					<ul class="nav nav-pills nav-stacked">
						<li><a href="adminMessage.jsp">修改个人信息</a></li>
					</ul>
					<ul class="nav nav-pills nav-stacked">
						<li><a href="changePwd.jsp">修改密码</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>

	<div class="py-4">
		<div class="container">
			<div class="row">
				<div class="col-md-12">
					<h1 class="display-1 text-center">个人信息</h1>
				</div>
			</div>
		</div>
	</div>

	<div class="py-5">
		<div class="container">
			<div class="row">
				<div class="col-md-3"></div>
				<div class="col-md-6">
					<form action="baseMessageModify.action" method="post" name=" form" onsubmit="return check();">
						<div class="form-group">
							<input type="text" class="form-control form-control-lg"
								value="${admin.id }" name="id" readonly="readonly">
						</div>
						<div class="form-group">
							<label id="adminAccount">账号</label> <input type="text"
								class="form-control form-control-lg" value="${admin.account }"
								name="account" readonly="readonly">
						</div>
						<div class="form-group">
							<label id="adminAccount">邮箱</label> <input type="text"
								class="form-control form-control-lg" value="${admin.email }"
								name="email" id="email">
						</div>
						<div class="form-group">
							<label id="userinfo">电话</label> <input type="text"
								class="form-control form-control-lg" value="${admin.phone }"
								name="phone" id="phone">
						</div>
						<div class="form-group">
							<label id="userinfo">权限等级</label> <input type="text"
								class="form-control form-control-lg" value="${admin.privilege }"
								name="privilege" readonly>
						</div>
						<div class="form-group">
							<button type="submit" class="btn btn-success">保存修改</button>
							<input type="button" class="btn btn-primary" name="cancel"
								value="返回" onclick="javascript:history.go(-1)" />
						</div>
						<font color="red">${requestScope.errorMessage}</font>
					</form>
				</div>
				<div class="col-md-3"></div>
			</div>
		</div>
	</div>


</body>
</html>